package com.sanri.buildingblock.exportcenter.enums;

/**
 * @description: 操作类型  导入, 导出
 * @author: huangzhengri
 * @time: 2023-04-14 15:02
 */
public enum  OperationType {
    /**
     * 导出
     */
    EXPORT(2),
    /**
     * 导入
     */
    IMPORT(1);
    private final int code;

    OperationType(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static OperationType getOperationTypeByCode(int code){
        if (code == 1){
            return IMPORT;
        }
        return EXPORT;
    }
}
